/*
 * @Author: i@rysa.cn
 * @Date: 2021-04-16 15:25:14
 * @LastEditTime: 2022-05-11 17:33:07
 * @LastEditors: i@rysa.cn
 * @Description: id雪花算法
 * @FilePath: \go-utils\snow_flak e.go
 */

package go_utils

import (
	"github.com/bwmarrin/snowflake"
)

var SnowFlake *snowflake.Node

func InitSnowflake(epoch int64, i int64) {
	snowflake.Epoch = epoch
	SnowFlake, _ = snowflake.NewNode(i)
}
